define(['app'],function(app){return {module: function($scope, $http, eventBusService, httpService, params) {

	$scope.find = function(){
	httpService.postpage(app.urls.parant_select,$scope.form,function(data){
		if("0000" === data.code){
			$scope.rows = data.data;
		}else{
			alert(data.msg);
		}
	});
	}
	$scope.find();
	
	//按钮点击事件-条件查询
	$scope.select = function(){
    	$scope.page.current = 1;
    	$scope.find();
    }
	
	$scope.saveForm = function(){
		var values = [];
		$('#'+$scope.controllerName+' input[name="dataPk"]:checked').each(function(){ 
			values.push($(this).val());
		});
		if($scope.formCheck()){
			if(values.length < 1){
				eventBusService.publish('modal.alert', {"title":"操作提示","content":"请选择添加数据。"});
			}else if(values.length > 1){
				eventBusService.publish('modal.alert', {"title":"操作提示","content":"您选择了多行数据，请重新选择。"});
			}else{
				eventBusService.publish("modal.page","modules/content/usermanagement/student/add?FatherControllerName="+$scope.controllerName+"&jhrid="+values[0]);
			}
		}
	}
}}});